import pandas as pd
from matplotlib import pyplot as plt

# 设置支持中文的字体
plt.rcParams['font.sans-serif'] = ['Microsoft YaHei']
plt.rcParams['axes.unicode_minus'] = False


def plot_feature(df, task):
    plt.figure(figsize=(15, 7))
    plt.plot(df[task], color='g', alpha=0.3)
    plt.title(f'{task}时序图')
    plt.grid(True)
    plt.tight_layout()
    plt.show()


if __name__ == '__main__':

    file_path = 'new_data_processed.xlsx'
    df = pd.read_excel(file_path)
    for task in df.columns:
        plot_feature(df, task)
